/*
This handles the display of descriptions for the different types
of user in the signup page as well as the corresponding forms for
different user sign-ups.
*/

var DESCRIPTION_AREAS = new Array("university_desc", "college_desc", "department_desc", "instructor_desc")
var UNIVERSITY = 0
var COLLEGE = 1
var DEPARTMENT = 2
var INSTRUCTOR = 3

/*
First of all, DON'T CALL THIS FUNCTION! Call writeFacade
instead. (See reason below).

I'll assume that the description variables are created at the
PHP file wrapping this code.

The descriptions themselves should be in an array running parallel
with DESCRIPTION_AREAS. The description array is assumed to be named
DESCRIPTIONS.

@param descIndex - the index in DESCRIPTION_AREAS of the name/id
of where we'll write the description (huh?). This will also be used
as the index for the description itself.
*/
function writeDescription(descIndex){
	document.getElementById("description_box").innerHTML = DESCRIPTIONS[descIndex]
}

function clearAll(){
	document.getElementById("description_box").innerHTML = ""
}

function writeForm(formIndex){
	document.getElementById("form_details_area").innerHTML = FORMS[formIndex];
}